package ru.braim.weather_app.dto.account;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import ru.braim.weather_app.models.Account;

@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AccountResponseDTO {
    private int id;

    private String firstName;

    private String lastName;

    private String email;

    public void convertAccountRequestDTOToAccountResponseDTO(AccountRequestDTO accountRequestDTO) {
        this.id = accountRequestDTO.getId();
        this.email = accountRequestDTO.getEmail();
        this.firstName = accountRequestDTO.getFirstName();
        this.lastName = accountRequestDTO.getLastName();
    }

    public void convertAccountToAccountResponseDTO(Account account) {
        this.id = account.getId();
        this.email = account.getEmail();
        this.firstName = account.getFirstName();
        this.lastName = account.getLastName();
    }


}
